//
//  TelevisionLiveTableViewCell.m
//  Project_A Gary
//
//  Created by leilei on 16/3/30.
//  Copyright © 2016年 www.lei.com. All rights reserved.
//

#import "TelevisionLiveTableViewCell.h"

@implementation TelevisionLiveTableViewCell


-(void)dealloc
{
    [_timeLab release];
    [_countLab release];
    [_titleLab release];
    [_stateLab release];
    [_imgView release];
    [_whiteView release];
    [super dealloc];
    
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
    
        [self.whiteView = [UIView alloc] init];
        self.whiteView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.whiteView];
        [_whiteView release];
        
        self.timeLab = [[UILabel alloc] init];
        self.timeLab.backgroundColor = [UIColor whiteColor];
        self.timeLab.textColor = [UIColor lightGrayColor];
        self.timeLab.font = [UIFont systemFontOfSize:11];
        [self.contentView addSubview:self.timeLab];
        [_timeLab release];
        
        self.titleLab = [[UILabel alloc] init];
        self.titleLab.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.titleLab];
        [_titleLab release];
        
        self.stateLab = [[UILabel alloc] init];
        self.stateLab.backgroundColor = [UIColor whiteColor];
        self.stateLab.textColor = [UIColor lightGrayColor];
        self.stateLab.font = [UIFont systemFontOfSize:11];
        [self.contentView addSubview:self.stateLab];
        [_stateLab release];
        
        self.countLab = [[UILabel alloc] init];
        self.countLab.backgroundColor = [UIColor whiteColor];
        self.countLab.textColor = [UIColor lightGrayColor];
        self.countLab.font = [UIFont systemFontOfSize:11];
        [self.contentView addSubview:self.countLab];
        [_countLab release];
        
        self.imgView = [[UIImageView alloc] init];
        self.imageView.backgroundColor = [UIColor cyanColor];
        [self.contentView addSubview:self.imgView];
        [_imgView release];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imgView.frame = CGRectMake(10, 0, BOUNDS_WIDTH - 20, 200);
    self.titleLab.frame = CGRectMake(10, 210, BOUNDS_WIDTH - 50, 30);
    self.stateLab.frame = CGRectMake(10, 250, 50, 20);
    self.timeLab.frame = CGRectMake(110, 250, 120, 20);
    self.countLab.frame = CGRectMake(280, 250, 70, 20);
    
    self.whiteView.frame = CGRectMake(10, 10, BOUNDS_WIDTH - 20, 260);

}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
